import './style.css'

import {createApp} from 'vue';
import App from './App.vue';
import router from './router/index'
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import * as  ElementPlusIconsVue from '@element-plus/icons-vue'
import pinia from "./store";

const app = createApp(App);

//使用路由
app.use(router)

//使用UI库
app.use(ElementPlus, {size: 'small', locale: zhCn});

//将图标注册为vue全局的组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    //key：组件的name,如：Plus；component:组件
    app.component(key, component)
}

// 使用存储管理
app.use(pinia)

app.mount('#app')
